<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/pages/comm/comm.jsp"%>
<%
long time=System.currentTimeMillis();
    request.setAttribute("time",time);
%>

<div class="dataTables_paginate paging_bootstrap pagination">
	<ul>
		<li class="${page.pageNo > 1?'prev':'prev disabled' }"><a href="javascript:;" onclick="go2Page_${time}(${page.pageNo-1})">←<span class="hidden-480">上一页</span></a></li>
		<c:forEach begin="${page.beginPageIndex }" end="${page.endPageIndex }" var="pageNo">
			<li class="${page.pageNo eq pageNo?'active':'' }"><a href="javascript:;" onclick="go2Page_${time}(${pageNo })">${pageNo }</a></li>
		</c:forEach>
		<li class="${page.pageNo < page.totalPage?'next':'next disabled' }"><a href="javascript:;" onclick="go2Page_${time}(${page.pageNo+1})"><span
				class="hidden-480">下一页</span>→</a></li>
	</ul>
</div>

<script type="text/javascript">
	function go2Page_${time}(pageNo) {
		var totalPage = '${page.totalPage}';
		totalPage = (totalPage=='')?0:totalPage;
		if (pageNo == undefined || pageNo == null || pageNo == "") {
			pageNo = 1;
		}
		if (pageNo > totalPage) {
			layer.msg("页码无效");
			return;
		}
        $("input[name='pageNo']").val(pageNo);
        //$("#queryForm").submit();
        // queryResult(pageNo);
       //调用查询函数
    	if($("#searchForm").attr("queryType") == 'H'){
   			queryResultH();
    	}else{
    		${not empty page.functionStr?page.functionStr:"queryResult();"}
        	$("input[name='pageNo']").val('');
    	}
    }
</script>